Skip to content

Feature/add file support for messenger#185

Merged
amithad merged 2 commits intodevelopfrom
feature/add_file_support_for_messenger
Mar 20, 2026
Merged

Feature/add file support for messenger#185
amithad merged 2 commits intodevelopfrom
feature/add_file_support_for_messenger

Conversation

@pulinduvidmal
Copy link
Contributor

Description

This change will add file & image support for messenger integrations

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update
  • CI/CD update
  • Other (please describe):

Testing

  • Unit tests pass locally
  • Integration tests pass locally
  • Manual testing completed
  • New tests added for changes

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds file and image support (multimodal capabilities) to Telegram and Facebook Messenger integrations, enabling AI agents to analyze images and documents sent by users.

Key Changes:

  • Implemented file/image download and base64 encoding for both Telegram and Messenger integrations
  • Added multimodal request handling via service.run_multi() to process text, images, and files together
  • Enhanced session management to preserve multimodal conversation context in OpenAI framework
  • Updated documentation with multimodal feature descriptions, limitations, and usage examples
  • Added Google ADK integration examples alongside existing OpenAI examples

Reviewed changes

Copilot reviewed 13 out of 29 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
examples/containerized/openai/uv.lock Downgraded openai-agents from 0.6.4 to 0.6.3; updated revision
examples/cli/openai/uv.lock Updated revision number
examples/cli/openai-dynamic/uv.lock Downgraded openai-agents; updated revision
examples/cli/multi/uv.lock Downgraded openai-agents; updated revision
examples/aws-serverless/openai/uv.lock Downgraded openai-agents; updated revision
examples/aws-containerized/openai-dynamodb/uv.lock Downgraded openai-agents; updated revision
examples/api/whatsapp/uv.lock Changed agentkernel source from local path to PyPI registry
examples/api/telegram/uv.lock Downgraded openai-agents; updated revision
examples/api/telegram/server_adk.py New Google ADK-based Telegram bot example with multimodal support
examples/api/telegram/build.sh Added 'adk' to the local build dependencies
examples/api/telegram/README.md Comprehensive multimodal documentation with usage examples and file type tables
examples/api/slack/uv.lock Downgraded openai-agents; updated revision
examples/api/openai/uv.lock Downgraded openai-agents; updated revision
examples/api/messenger/uv.lock Changed agentkernel to local source; downgraded multiple packages
examples/api/messenger/server_adk.py New Google ADK-based Messenger bot example with multimodal support
examples/api/messenger/build.sh Added 'adk' to the local build dependencies
examples/api/messenger/README.md Added multimodal feature documentation with file types and size limits
examples/api/mcp/multi/uv.lock Downgraded openai-agents; updated revision
examples/api/instagram/uv.lock Downgraded openai-agents; updated revision
examples/api/hooks/uv.lock Downgraded openai-agents; updated revision
examples/api/gmail/uv.lock Downgraded openai-agents; updated revision
examples/api/a2a/multi/uv.lock Downgraded openai-agents; updated revision
docs/docs/integrations/telegram.md Enhanced documentation with multimodal features, usage examples, and limitations
docs/docs/integrations/messenger.md Added comprehensive multimodal documentation with implementation details
ak-py/src/agentkernel/integration/telegram/telegram_chat.py Core implementation for file/image download, processing, and multimodal request handling
ak-py/src/agentkernel/integration/telegram/README.md Technical documentation for multimodal support with configuration details
ak-py/src/agentkernel/integration/messenger/messenger_chat.py Core implementation for attachment processing with file size validation
ak-py/src/agentkernel/integration/messenger/README.md Technical documentation for multimodal support with security considerations
ak-py/src/agentkernel/framework/openai/openai.py Added session persistence for multimodal conversations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 21, 2026 17:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 26 changed files in this pull request and generated 21 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 21, 2026 17:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 26 changed files in this pull request and generated 17 comments.

Comments suppressed due to low confidence (1)

ak-py/src/agentkernel/integration/messenger/messenger_chat.py:5

  • Import of 'mimetypes' is not used.
import traceback

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 21, 2026 18:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 26 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 24, 2026 09:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 32 changed files in this pull request and generated 19 comments.

Comments suppressed due to low confidence (1)

ak-py/src/agentkernel/framework/langgraph/langgraph.py:433

  • The LangGraphToolBuilder.bind() method now wraps a StructuredTool.from_function() call with func=None and only provides coroutine parameter. This breaks synchronous function support. If a non-async function is passed, the isinstance check on line 424 will fail, and the code will fall through without handling sync functions. The original code likely handled both sync and async functions. Add an else branch to handle synchronous functions with func parameter instead of coroutine.
            if asyncio.iscoroutinefunction(func):
                tools.append(
                    StructuredTool.from_function(
                        func=None,
                        coroutine=func,
                        name=func.__name__,
                        description=func.__doc__ or func.__name__,
                    )
                )
            else:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pulinduvidmal pulinduvidmal force-pushed the feature/add_file_support_for_messenger branch from 51d60b9 to 001ea57 Compare March 19, 2026 19:38
@amithad amithad merged commit 551d800 into develop Mar 20, 2026
35 checks passed
@amithad amithad deleted the feature/add_file_support_for_messenger branch March 20, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants